#include<iostream>
int main()
{
        int i,j,n;
	float ma,v[20];
        std::cout<<"n=";std::cin>>n;
        for(i=0;i<n;i++)
        {
                std::cout<<"v["<<i<<"]=";
                std::cin>>v[i];
        }
        std::cout<<"("<<v[0];
        for(i=1;i<n;i++)
                std::cout<<","<<v[i];
        std::cout<<") ==> (";
        for(i=0;i<n-1;i+=2)
        {
		ma=(v[i]+v[i+1])/2;
                for(j=n;j>=i+1;j--)
                        v[j+1]=v[j];
                v[i+1]=ma;
                n++;
        }
        std::cout<<v[0];
        for(i=1;i<n;i++)
                std::cout<<","<<v[i];
        std::cout<<")\n";
        return 0;
}


